import VueRouter from "vue-router"


import HomeContainer from './components/tabbars/HomeContainer.vue'
import MemberContainer from './components/tabbars/MemberContainer.vue'
import ShowcarContainer from './components/tabbars/ShowcarContainer.vue'
import SearchContainer from './components/tabbars/SearchContainer.vue'

import NewsList from './components/news/NewsList.vue'
import NewsInfo from './components/news/NewsInfo.vue'

import PhotoList from './components/photos/PhotoList.vue'
import PhotoInfo from './components/photos/PhotoInfo.vue'

import GoodsList from './components/goods/GoodsList.vue'
import GoodsInfo from './components/goods/GoodsInfo.vue'
import GoodsDesc from './components/goods/GoodsDesc.vue'

import Comment from './components/sub-compoents/Comment.vue'

const router = new VueRouter({
  routes: [
    { path: '/', redirect: '/home' },
    { path: '/home', component: HomeContainer },
    { path: '/member', component: MemberContainer },
    { path: '/showcar', component: ShowcarContainer },
    { path: '/search', component: SearchContainer },
    { path: '/home/newslist', component: NewsList },
    { path:'/home/newsinfo/:id',component:NewsInfo,props:true},
    { path:'/home/photolist',component:PhotoList},
    { path:'/home/photoinfo/:id',component:PhotoInfo,props:true},
    { path:'/home/goodslist',component:GoodsList},
    { path: '/home/goodsinfo/:id',component:GoodsInfo,props:true,
    children:[
      { path: '', redirect: 'desc/:id' },
      //{path:'',component:GoodsDesc},
      {path:'desc/:id',component:GoodsDesc,props:true},
      {path:'sabb/:id',component:Comment,props:true}
    ]}
  ],
  linkActiveClass:'mui-active'
})

export default router